home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / LIBRARY / PASCALL / TEMPJUNK / FERNG.PAS < prev    next >
Pascal/Delphi Source File  |  1992-10-14  |  851b  |  47 lines

  1. program gottt;
  2. uses
  3.      crt, graph,dos;
  4. var
  5.      x1, x2, y1, y2, sx, sy, y, i, radius, gd, gm:integer;
  6.  
  7.  
  8. procedure update;
  9. begin
  10.      x1:=x1+sx;
  11.      y1:=y1+sy;
  12.      setcolor(getmaxcolor);
  13.      circle(x1,y1,radius);
  14.      setcolor(0);
  15.      circle(x2,y2,radius);
  16. end;
  17.  
  18.  
  19. procedure go;
  20. begin
  21.      x2:=x1;
  22.      y2:=y1;
  23.      if x1+sx>(getmaxx-radius) then sx:=(sx*(-1));
  24.      if x1+sx<radius then sx:=(sx*(-1));
  25.      if y1+sy>(getmaxy-radius) then sy:=(sy*(-1));
  26.      if y1+sy<radius then sy:=(sy*(-1));
  27.      update;
  28. end;
  29.  
  30.  
  31. begin
  32.      setcbreak(true);
  33.      clrscr;
  34.      gd:=detect;
  35.      initgraph(gd,gm,'');
  36. {     if gd<>grOK then halt;}
  37.      radius:=24;
  38.      sx:=3;
  39.      sy:=8;
  40.      x1:=radius;
  41.      y1:=radius;
  42.      x2:=radius;
  43.      y2:=radius;
  44.      y:=0;
  45.      for i:=1 to 10000 do go;
  46.      closegraph;
  47. end.